package cn.wei.sdd.core.service.impl;

import cn.wei.sdd.core.pojo.entity.WarehouseProduct;
import cn.wei.sdd.core.mapper.WarehouseProductMapper;
import cn.wei.sdd.core.pojo.query.WarehouseProductQuery;
import cn.wei.sdd.core.pojo.vo.WarehouseProductVO;
import cn.wei.sdd.core.service.WarehouseProductService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 商品库存表 服务实现类
 * </p>
 *
 * @author Wei
 * @since 2021-11-04
 */
@Service
public class WarehouseProductServiceImpl extends ServiceImpl<WarehouseProductMapper, WarehouseProduct> implements WarehouseProductService {



    @Override
    public IPage<WarehouseProductVO> listPage(Page<WarehouseProductVO> pageParam, WarehouseProductQuery warehouseProductQuery) {

        if (warehouseProductQuery==null){
            return baseMapper.mySelectPage(pageParam,null);
        }else{
            return baseMapper.mySelectPage(pageParam,warehouseProductQuery);
        }
    }
}
